Optimal. Leaf size=451 \[ -\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {2 \left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{315 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {4 \left (c^2-d^2\right ) \left (5 b^2 c^3-45 a b c^2 d-84 a^2 c d^2-57 b^2 c d^2-75 a b d^3\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{315 d^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.62, antiderivative size = 451, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2870, 2832,
2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-\left (b^2 \left (5 c^3-57 c d^2\right )\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}+\frac {4 \left (c^2-d^2\right ) \left (-84 a^2 c d^2-45 a b c^2 d-75 a b d^3+5 b^2 c^3-57 b^2 c d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{315 d^2 f \sqrt {c+d \sin (e+f x)}}+\frac {2 \left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-\left (b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right )\right ) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{315 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 \left (7 d^2 \left (9 a^2+7 b^2\right )-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rule 2870
Rubi steps
\begin {align*} \int (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{5/2} \, dx &=-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {2 \int (c+d \sin (e+f x))^{5/2} \left (\frac {1}{2} \left (9 a^2+7 b^2\right ) d-b (b c-9 a d) \sin (e+f x)\right ) \, dx}{9 d}\\ &=\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {4 \int (c+d \sin (e+f x))^{3/2} \left (\frac {3}{4} d \left (21 a^2 c+13 b^2 c+30 a b d\right )+\frac {1}{4} \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \sin (e+f x)\right ) \, dx}{63 d}\\ &=-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {8 \int \sqrt {c+d \sin (e+f x)} \left (\frac {3}{8} d \left (240 a b c d+21 a^2 \left (5 c^2+3 d^2\right )+b^2 \left (55 c^2+49 d^2\right )\right )+\frac {3}{4} \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \sin (e+f x)\right ) \, dx}{315 d}\\ &=-\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {16 \int \frac {\frac {3}{16} d \left (30 a b d \left (27 c^2+5 d^2\right )+b^2 c \left (155 c^2+261 d^2\right )+21 a^2 \left (15 c^3+17 c d^2\right )\right )+\frac {3}{16} \left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{945 d}\\ &=-\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {\left (2 \left (c^2-d^2\right ) \left (5 b^2 c^3-45 a b c^2 d-84 a^2 c d^2-57 b^2 c d^2-75 a b d^3\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{315 d^2}+\frac {\left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) \int \sqrt {c+d \sin (e+f x)} \, dx}{315 d^2}\\ &=-\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {\left (\left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{315 d^2 \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 \left (c^2-d^2\right ) \left (5 b^2 c^3-45 a b c^2 d-84 a^2 c d^2-57 b^2 c d^2-75 a b d^3\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{315 d^2 \sqrt {c+d \sin (e+f x)}}\\ &=-\frac {4 \left (84 a^2 c d^2+15 a b d \left (3 c^2+5 d^2\right )-b^2 \left (5 c^3-57 c d^2\right )\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{315 d f}-\frac {2 \left (7 \left (9 a^2+7 b^2\right ) d^2-10 b c (b c-9 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{315 d f}+\frac {4 b (b c-9 a d) \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{63 d f}-\frac {2 b^2 \cos (e+f x) (c+d \sin (e+f x))^{7/2}}{9 d f}+\frac {2 \left (21 a^2 d^2 \left (23 c^2+9 d^2\right )+30 a b d \left (3 c^3+29 c d^2\right )-b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{315 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {4 \left (c^2-d^2\right ) \left (5 b^2 c^3-45 a b c^2 d-84 a^2 c d^2-57 b^2 c d^2-75 a b d^3\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{315 d^2 f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.88, size = 382, normalized size = 0.85 \begin {gather*} \frac {8 \left (-d^2 \left (30 a b d \left (27 c^2+5 d^2\right )+b^2 c \left (155 c^2+261 d^2\right )+21 a^2 \left (15 c^3+17 c d^2\right )\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right )+\left (-21 a^2 d^2 \left (23 c^2+9 d^2\right )-30 a b d \left (3 c^3+29 c d^2\right )+b^2 \left (10 c^4-279 c^2 d^2-147 d^4\right )\right ) \left ((c+d) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right )-c F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right )\right )\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-d (c+d \sin (e+f x)) \left (2 \left (924 a^2 c d^2+30 a b d \left (36 c^2+23 d^2\right )+b^2 \left (20 c^3+747 c d^2\right )\right ) \cos (e+f x)-10 b d^2 (19 b c+18 a d) \cos (3 (e+f x))+2 d \left (540 a b c d+126 a^2 d^2+b^2 \left (150 c^2+133 d^2\right )\right ) \sin (2 (e+f x))-35 b^2 d^3 \sin (4 (e+f x))\right )}{1260 d^2 f \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2111\) vs.
\(2(489)=978\).
time = 33.13, size = 2112, normalized size = 4.68
method | result | size |
default | \(\text {Expression too large to display}\) | \(2112\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.19, size = 803, normalized size = 1.78 \begin {gather*} \frac {\sqrt {2} {\left (20 \, b^{2} c^{5} - 180 \, a b c^{4} d + 690 \, a b c^{2} d^{3} + 450 \, a b d^{5} - 3 \, {\left (7 \, a^{2} + 31 \, b^{2}\right )} c^{3} d^{2} + 3 \, {\left (231 \, a^{2} + 163 \, b^{2}\right )} c d^{4}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) + \sqrt {2} {\left (20 \, b^{2} c^{5} - 180 \, a b c^{4} d + 690 \, a b c^{2} d^{3} + 450 \, a b d^{5} - 3 \, {\left (7 \, a^{2} + 31 \, b^{2}\right )} c^{3} d^{2} + 3 \, {\left (231 \, a^{2} + 163 \, b^{2}\right )} c d^{4}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) - 3 \, \sqrt {2} {\left (-10 i \, b^{2} c^{4} d + 90 i \, a b c^{3} d^{2} + 870 i \, a b c d^{4} + 3 i \, {\left (161 \, a^{2} + 93 \, b^{2}\right )} c^{2} d^{3} + 21 i \, {\left (9 \, a^{2} + 7 \, b^{2}\right )} d^{5}\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) - 3 \, \sqrt {2} {\left (10 i \, b^{2} c^{4} d - 90 i \, a b c^{3} d^{2} - 870 i \, a b c d^{4} - 3 i \, {\left (161 \, a^{2} + 93 \, b^{2}\right )} c^{2} d^{3} - 21 i \, {\left (9 \, a^{2} + 7 \, b^{2}\right )} d^{5}\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right ) + 6 \, {\left (5 \, {\left (19 \, b^{2} c d^{4} + 18 \, a b d^{5}\right )} \cos \left (f x + e\right )^{3} - {\left (5 \, b^{2} c^{3} d^{2} + 270 \, a b c^{2} d^{3} + 240 \, a b d^{5} + 3 \, {\left (77 \, a^{2} + 86 \, b^{2}\right )} c d^{4}\right )} \cos \left (f x + e\right ) + {\left (35 \, b^{2} d^{5} \cos \left (f x + e\right )^{3} - 3 \, {\left (25 \, b^{2} c^{2} d^{3} + 90 \, a b c d^{4} + 7 \, {\left (3 \, a^{2} + 4 \, b^{2}\right )} d^{5}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {d \sin \left (f x + e\right ) + c}}{945 \, d^{3} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \left (c + d \sin {\left (e + f x \right )}\right )^{\frac {5}{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________